package Date;

import java.util.Calendar;
import java.util.Date;

public class Calendar01 {
    public static void main(String[] args) {
        Calendar calendar = Calendar.getInstance();
        System.out.println(calendar);
        calendar.set(Calendar.YEAR, 2000);
        calendar.set(Calendar.MONTH, 11);
        calendar.set(Calendar.DAY_OF_MONTH, 31);
        calendar.add(Calendar.YEAR, 22);
        int year = calendar.get(Calendar.YEAR);
        int month = calendar.get(Calendar.MONTH);
        int day = calendar.get((Calendar.DAY_OF_MONTH));
        Date time = calendar.getTime();
        System.out.println(time);
        System.out.println(year + "年" + (month + 1) + "月" + day + "日");
    }
}
